package com.bizframework.core.domain;

/**
 * 排序信息
 * 
 * @author liujiamin
 * 
 */
public class SortInfo {

	private String name;

	private SortDirection sortDirection;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public SortInfo(String field, SortDirection sortDirection) {
		this.name = field;
		this.sortDirection = sortDirection;

	}

	@Override
	public boolean equals(Object obj) {
		if (super.equals(obj)) {
			return true;
		} else {
			SortInfo thisObj = (SortInfo) obj;
			return (this.name == thisObj.name && thisObj.sortDirection == thisObj.sortDirection);
		}
	}

	public SortDirection getSortDirection() {
		return sortDirection;
	}

	public void setSortDirection(SortDirection sortDirection) {
		this.sortDirection = sortDirection;
	}
}